package businesslogic.score;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;
import java.util.ArrayList;

import javax.swing.table.DefaultTableModel;

import po.scorepo.Score;
import po.userpo.StuID;
import vo.scorevo.ScoreVO;
import vo.scorevo.SetScoreVO;
import vo.scorevo.ShowScoreVO;
import businesslogicservice.ScoreControllerImpli;
import businesslogicservice.scoreblservide.LogOffScoreBLService;
import businesslogicservice.scoreblservide.SetScoreBLService;
import businesslogicservice.scoreblservide.ShowScoreBLService;
import Enum.ResultMessage;

public class ScoreController extends UnicastRemoteObject implements ScoreControllerImpli{

	public ResultMessage setScore(ArrayList<SetScoreVO> scoreList) throws RemoteException{
		SetScoreBLService setScore = new SetScore();
		ResultMessage resultMessage = setScore.setScore(scoreList);
		return resultMessage;
	}
	
	public ScoreController(ScoreVO scoreVO) throws RemoteException{
		
	}
	
	public ArrayList<Score> showScore(ShowScoreVO showScoreVO) throws RemoteException{
		ShowScoreBLService showScore = new ShowScore();
		ArrayList<Score> scoreList= showScore.showScore(showScoreVO);
		return scoreList;
	}
	
	public ResultMessage logOffScore(ScoreVO scoreVO) throws RemoteException{
		LogOffScoreBLService logOffScore = new LogOffScore();
		ResultMessage resultMessage = logOffScore.logOffScore(scoreVO);
		return resultMessage;
	}
	
	public ScoreVO getScore(ScoreVO scoreVO) throws RemoteException{
		return null;
	}
}
